import { defineStore } from "pinia";
import request from "../../request";
export const shop = defineStore({
    id: "shop",
    state: () => ({
        commodityinfo: ""
    }),
    getters: () => ({
        getmoney(e) {
            return e
        }
    }),
    actions: {
        getshopinfo() {
            return new Promise((resolve, reject) => {
                request.get("/shopinfo.json").then(res => {
                    this.commodityinfo = res.data
                    console.log(this.commodityinfo);
                    resolve(res.data)
                })
            })
        }

    }
})